<?php
require_once(dirname(__FILE__) . '/simpletest/autorun.php');

require_once('index.php');
//require_once('../app/Model/ProductNew.php');
/*
class TestOfitiral extends UnitTestCase {
	
	function __construct() {
        $this->webapp = new Index();
		$this->webapp->run();
    }

	// 測試getList獲取的數組長度是否大於等於7
	function test_ProductNew_getList() {
		$pn = new Model_ProductNew();
		$x = $pn->getList();
		$y = count($x);
		$this->assertOutsideMargin($y, 0, 6);	// assertOutsideMargin($x, $y, $m)	Fail if abs($x - $y) < $m is true
		//print_r($x);
    }

	// 測試get_new_invite_list獲取的數組長度是否大於等於7
    function test_Index_get_new_invite_list() {
		$x = $this->webapp->get_new_invite_list();
		$y = count($x);
		$this->assertOutsideMargin($y, 0, 6);	// assertOutsideMargin($x, $y, $m)	Fail if abs($x - $y) < $m is true
    }

	// 測試get_submit_report_list獲取的數組長度是否大於等於4
	function test_Index_get_submit_report_list() {
		$x = $this->webapp->get_submit_report_list();
		$y = count($x['result']);
		$this->assertOutsideMargin($y, 0, 3);	// assertOutsideMargin($x, $y, $m)	Fail if abs($x - $y) < $m is true
    }
	
	// 測試get_submit_report_list獲取的數組長度是否大於等於4
	function test_Index_get_new_report_list() {
		$x = $this->webapp->get_new_report_list();
		$y = count($x['result']);
		$this->assertOutsideMargin($y, 0, 3);	// assertOutsideMargin($x, $y, $m)	Fail if abs($x - $y) < $m is true
    }
	

	
}
*/

class AllTests extends TestSuite {
    function AllTests() {
        //$this->TestSuite('All tests for SimpleTest ' . SimpleTest::getVersion());
        $this->addFile(dirname(__FILE__) . '/pascotest_Model_Product.php');
		$this->addFile(dirname(__FILE__) . '/pascotest_Model_ProductNew.php');
    }
}
?>